<template>
    <div class="page-404">
        <el-alert
            title="404"
            type="error"
            description="页面丢失了"
            :closable="false"
            show-icon>
        </el-alert>

        <div class="page-404-btn">
            <el-button type="warning" @click="onReset">重试</el-button>

            <el-button @click="onHome">管理首页</el-button>
        </div>
    </div>
</template>

<script lang="ts">
import { Vue, Component } from 'vue-property-decorator';
import AdminContainer from '@/components/admin-container.vue';

@Component({
    components: { AdminContainer }
})
export default class Page extends Vue {
    onReset() {
        this.$router.replace({
            query: {
                t: (new Date().valueOf()).toString(),
            }
        })
    }

    onHome() {
        this.$router.push('/');
    }
}
</script>

<style scoped lang="scss">
.page-404 {
    width: 500px;
    margin: 20vh auto auto;
    border: solid 1px #efefef;
    &-btn {
        padding: 20px;
        text-align: center;
        margin-top: 20px;
    }
}
</style>
